package chapter2.No2_1_synchronized同步方法.g出现异常锁自动释放;

/**
 * *：一个线程出现异常会自动释放锁
 *
 * @author liujian
 * @version 2016/11/11 0011
 */
public class Main {
    public static void main(String[] args) {
        TestObject to = new TestObject();
        MyThread a = new MyThread(to);
        a.setName("a");
        MyThread b = new MyThread(to);
        b.setName("b");

        a.start();
        b.start();

    }
}
